package com.gupaoedu.springboot.springbootfrist.thirdDemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * <p>
 *
 * </p>
 *
 * @author Nicky
 * @since 2019-07-12
 */
@SpringBootApplication
@EnableDefineService(exclude = {CacheSevice.class})
public class EnableDemoMain {

    public static void main(String[] args) {
        //得到所有SpringBoot的配置类
        ConfigurableApplicationContext ca =
                SpringApplication.run(EnableDemoMain.class, args);
//        String[] defClasses = ca.getBeanDefinitionNames();
//        for (String defClass : defClasses) {
//            System.out.println(defClass);
//        }
        System.out.println(ca.getBean(CacheSevice.class));
        System.out.println(ca.getBean(LogService.class));
    }

}
